package cn.wolfcode.luowowo.acticle.service;


import cn.wolfcode.luowowo.acticle.domain.QuestionAndAnswer;
import cn.wolfcode.luowowo.acticle.query.QuestionAndAnswerQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 问答服务
 */
public interface IQuestionAndAnswerService {

    /**
     * 分页
     * @param qo
     * @return
     */
    PageInfo query(QuestionAndAnswerQuery qo);
    PageInfo query2(QuestionAndAnswerQuery qo);

    /**
     * 改变转态
     * @param QuestionAndAnswer
     */
    void changeState(QuestionAndAnswer QuestionAndAnswer);

    /**
     * 查单个
     * @param id
     * @return
     */
    QuestionAndAnswer get(Long id);

    /**
     * 根据地区id查询
     * @param destId
     * @return
     */
    List<QuestionAndAnswer> queryQuestionAndAnswerByDestId(Long destId);

    /**
     * 添加或保存
     * @param QuestionAndAnswer
     */
    Long saveOrUpdate(QuestionAndAnswer QuestionAndAnswer);

    /**
     * 查所有
     * @return
     */
    List<QuestionAndAnswer> list();

}
